package com.csun.cmny.provider.model.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

@Data
@Table(name = "cn_dmc_csun_gateway_cmd")
public class DmcCsunGatewayCmd {
    /**
     * 设备Id
     */
    @Id
    @Column(name = "device_id")
    private Long deviceId;

    /**
     * 功能码
     */
    @Id
    @Column(name = "msg_type")
    private String msgType;

    /**
     * 传感器编号
     */
    @Id
    @Column(name = "sensor_no")
    private String sensorNo;

    /**
     * 设备编号
     */
    @Column(name = "device_no")
    private String deviceNo;

    /**
     * 指令任务Id
     */
    @Column(name = "event_id")
    private String eventId;

    /**
     * 发送质量
     */
    private Integer qos;

    /**
     * 指令内容
     */
    private String content;

    /**
     * 创建人
     */
    private String creator;

    /**
     * 创建人ID
     */
    @Column(name = "creator_id")
    private Long creatorId;

    /**
     * 创建时间
     */
    @Column(name = "created_time")
    private Date createdTime;

    /**
     * 最近操作人
     */
    @Column(name = "last_operator")
    private String lastOperator;

    /**
     * 最后操作人ID
     */
    @Column(name = "last_operator_id")
    private Long lastOperatorId;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private Date updateTime;

    @JsonIgnore
    @Transient
    private Integer count;

}